<?php

return [
    'templatePath' => __DIR__ . '/../view',

    'router' => array(
        'routes' => array(
            'contact' => array(
                'type' => 'literal',
                'options' => array(
                    'route' => '/contact',
                    'defaults' => array(
                        'controller' => 'Contact\Controller',
                        'action' => 'index'
                    )
                ),
                'may_terminate' => true,
                'child_routes' => array(
                    'thanks' => array(
                        'type' => 'literal',
                        'options' => array (
                            'route' => '/thanks.html',
                            'defaults' => array (
                                'action' => 'thanks'
                            )
                        )
                    )
                )
            ),
            'adminContact' => array(
                'type' => 'segment',
                'options' => array (
                    'route' => '/admin/contact[/:action][/:id]',
                    'constraints' => array(
                        'action'    => '[a-zA-Z][a-zA-Z0-9_-]+',
                        'id'        => '[0-9]+'
                    ),
                    'defaults' => array (
                        'controller' => 'Contact\AdminController',
                        'action' => 'message'
                    )
                )
            )
        )
    ),

    'mainMenu' => [
        [
            'title' => 'Contact',
            'alias' => 'contact'
        ]
    ],
    'adminMainMenu' => [
        [
            'title' => 'Contact messages',
            'alias' => 'admin/contact'
        ]
    ]
];
